<?php

namespace App\Admin\Actions\Post;

use App\Models\User;
use Illuminate\Support\Facades\DB;
use Encore\Admin\Actions\RowAction;
use Illuminate\Database\Eloquent\Model;
use App\Jobs\ResumeJob;

class FxPostDd extends RowAction
{
    public $name = '单独分析简历';
    
    public function handle(Model $model)
    {
	    /**
	     * @var $model User
	     */
    	
    	dispatch(new ResumeJob($model))->onQueue('default');
    	
    	
	    return $this->response()->success('分析已完成')->refresh();
    }
	
	public function dialog()
	{
		$this->confirm('确定分析数据吗?');
	}
}
